package com.zzy.tomcat;

import org.apache.catalina.startup.Tomcat;

/**
 * 文件描述: <br>
 * 版权所有: Copyright (c) 2021/6/26<br>
 * 完成日期: 2021/6/26<br>
 *
 * @author zainzhang
 */
public class SpringApplication {
    public static void run() {
        Tomcat tomcat = new Tomcat();
        tomcat.setPort(8081);
        try {
            tomcat.addWebapp("/", "/");
            tomcat.start();
            tomcat.getServer().await();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
